package com.chuangsi.project.admin.dto.app.order;


import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Data
public class ResPlaceAnOrderDto {


    @ApiModelProperty(value = "支付订单id")
    private Long payOrderId;

    @ApiModelProperty(value = "线下支付-二维码图片")
    private String offlinePayPic = "'";

    @ApiModelProperty(value = "线上支付-packageVal")
    private String packageVal;

    @ApiModelProperty(value = "线上支付-nonceStr")
    private String nonceStr;

    @ApiModelProperty(value = "线上支付-timeStamp")
    private String timeStamp;

    @ApiModelProperty(value = "线上支付-paySign")
    private String paySign;

    @ApiModelProperty(value = "线上支付-signType")
    private String signType;

    public ResPlaceAnOrderDto() {

    }

    public ResPlaceAnOrderDto(Long payOrderId) {
        this.payOrderId = payOrderId;
    }

    public ResPlaceAnOrderDto(Long payOrderId,String offlinePayPic) {
        this.payOrderId = payOrderId;
        this.offlinePayPic = offlinePayPic;
    }

    public ResPlaceAnOrderDto(Long payOrderId,PrepayWithRequestPaymentResponse response) {
        this.payOrderId = payOrderId;
        this.packageVal = response.getPackageVal();
        this.nonceStr = response.getNonceStr();
        this.timeStamp = response.getTimeStamp();
        this.paySign = response.getPaySign();
        this.signType = response.getSignType();

    }
}
